<?php
/**
 * 视图控制器
 */
namespace app\manage\controller\goods;

use app\manage\controller\Base;
use app\common\query\MallGoods;
class Show extends Base
{

	public function index(){
        $params = $this->request->get();
        $whereFields = ['page','title','price','coin_id','status','is_tj','start','end'];
        // 查询字符串
        $whereStr = parseQuery($params,$whereFields);
        // 参数数组
        $whereData = [];
        foreach($whereFields as $field):
            if(isset($params[$field]))
                $whereData[$field] = $params[$field];
        endforeach;
		$pageData = [
			'title' => '商品列表'
		];
		$this->assign('pageData',$pageData);
        $this->assign('whereData',$whereData);
		return view();
	}

    /*public function add(){
        $pageData = [
            'title' => '商品添加'
        ];
        $this->assign('pageData',$pageData);
        return view();
    }

    public function edit(){
        $model = new MallGoods;
        $goods_id = $this->request->get('id');
        $goodsDate = $model->getGoodsDetail($goods_id);
        $pageData = [
            'title' => '商品修改'
        ];
        $this->assign('pageData',$pageData);
        $this->assign('goodsDate',$goodsDate);
        return view();
    }*/

}